home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 120
/
Vol 120.iso
/
games
/
battlefi.swf
/
scripts
/
frame_638
/
PlaceObject2_427_47
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2010-11-09
|
1KB
|
53 lines
onClipEvent(enterFrame){
if(_root.vic)
{
this._y = 491.2;
}
if(!this.hitTest(_root.castle))
{
this._x += speed;
}
if(duped && _root.population < _root.poptot)
{
_root.population = _root.population + 1;
_root.gold -= 750;
i++;
duplicateMovieClip(_root.ram,"ram" + i,16384 + (400 + i));
_root["ram" + i]._x = -6.399999999999999;
_root["ram" + i]._y = random(50) + 251.7;
duped = false;
}
if(this.hitTest(_root.castle) && !attkin)
{
this.gotoAndPlay("attk");
attkin = true;
}
if(this.dead && this._currentframe < 56)
{
this.gotoAndPlay("die");
}
l = _root.lvl;
while(l < _root.lvl + 0.1)
{
if(this.hit.hitTest(_root["a" + l]))
{
this.gotoAndPlay("die");
_root["a" + l].removeMovieClip();
}
l++;
}
if(this.dead)
{
this._x -= speed;
}
if(this.deadfull)
{
this._x = -1000000000;
}
if(this.hit.hitTest(_root.castle["th" + _root.castle.thing.i]))
{
this.gotoAndPlay("die");
_root.castle["th" + _root.castle.thing.i].removeMovieClip();
}
}